package com.yeyks.dal.dao;

import com.yeyks.dal.domain.Feedback;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface FeedbackMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Feedback record);

    Feedback selectByPrimaryKey(Integer id);

    List<Feedback> selectAll();

    int updateByPrimaryKey(Feedback record);

    List<Feedback> selectByDateNameReaded(@Param("gmtStart") Date gmtStart,
                                          @Param("gmtEnd") Date gmtEnd,
                                          @Param("user") String user,
                                          @Param("readed") Boolean readed,
                                          @Param("report") Boolean report,
                                          @Param("offset") Integer offset,
                                          @Param("maxrow") Integer maxrow);

    Integer selectByDateNameReadedCount(@Param("gmtStart") Date gmtStart,
                                        @Param("gmtEnd") Date gmtEnd,
                                        @Param("user") String user,
                                        @Param("readed") Boolean readed,
                                        @Param("report") Boolean report);

    int markReaded(@Param("id") Integer id);

    int insertReturnId(Feedback record);
}